package cn.com.yuuuu.domain;

import lombok.Builder;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

/**
 * @author bhl
 */
@Builder
@Data
@Document(indexName = "user")
public class User {

    @Id
    @Field(store = true, name = "user_id", type = FieldType.Keyword)
    private String userId;

    @Field(store = true, type = FieldType.Text)
    private String name;

    @Field(store = true, type = FieldType.Integer)
    private Integer age;

    @Field(store = true, type = FieldType.Date)
    private Date birthday;

}